﻿using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.Text;

namespace MongoDBTest2
{
    public class Person
    {
        [BsonId]
        public ObjectId Id { get; set; }

        //默认Id会转为:_id,并自增
        //public ObjectId Id { get; set; }

        //[BsonElement("_id")]
        //public ObjectId Id { get; set; }

        public string Name { get; set; }

        public int Age { get; set; }

        public int Height { get; set; }
    }
}
